Basic data and empirical analysis code for Lochner & Moretti, "Estimating and Testing Models with Many Treatment Levels and Limited Instruments", Review of Economics and Statistics.


The stata program "LAUNCHER.do" will run the main analysis (including OLS and IV regressions and tests) used in the paper. This program calls the five stata .ado files and uses analysis-specific data assumed to be located in the following subdirectories:

--   ".\Crime Blacks"
--   ".\Crime Whites"
--   ".\Earnings"
--   ".\Low Birth Weight"
--   ".\Preterm Birth"

The .ado files essentially perform the analysis.  They are all very similar only they perform the analysis on the appropriate data and specifications given the outcome of interest.


1. For the incarceration analysis of Lochner & Moretti (2004) data:

--   The stata files "Replication_Black.do" and "Replication_White" take stata data file "data7.dta" from Lochner & Moretti (2004), names variables, and creates stata data sets "WHITES.dta" and "BLACKS.dta" that are used in the analysis. The stata .ado files presume that these created data sets have been put inside ".\Crime Whites" and ".\Crime Blacks" subdirectories.  These data are originally taken for men ages 20-60 from the 1960-80 U.S. Censuses (IPUMS data from 1960 1% sample, 1970 Forms 1 and 2 State samples, and 1980 5 percent State sample).  NOTE: the program for whites (Replication_White.do) creates a 90% random subsample of whites, which could differ each time the program is run. Thus, samples and results could differ slightly each time WHITES.dta is created using this program.

--   Variables in "BLACKS.dta" and "WHITES.dta":

prison	Dummy for in Prison
year	Census Year
educ	Years of Schooling
ca9	Dummy: Compulsory attendance = 9
ca10	Dummy: Compulsory attendance = 10 
ca11	Dummy: Compulsory attendance >= 11
birthpl	State of Birth
state	State of Residence
yearat14	Year person was Age 14
cohort	= 1914 if yearat14 >=1914 & yearat14 <= 1923 
               	= 1924 if yearat14 >=1924 & yearat14 <= 1933
                	= 1934 if yearat14 >=1934 & yearat14 <= 1943
                = 1944 if yearat14 >=1944 & yearat14 <= 1953
                = 1954 if yearat14 >=1954 & yearat14 <= 1963
                = 1964 if yearat14 >=1964 & yearat14 <= 1974
rage          =20 if age >=20 & age <= 22
                =23 if age >=23 & age <= 25
                =26 if age >=26 & age <= 28
                =29 if age >=29 & age <= 31
                =32 if age >=32 & age <= 34
                =35 if age >=35 & age <= 37
                =38 if age >=38 & age <= 40
                =41 if age >=41 & age <= 43
                =44 if age >=44 & age <= 46
                =47 if age >=47 & age <= 49
                =50 if age >=50 & age <= 52
                =53 if age >=53 & age <= 55
                =56 if age >=56 & age <= 58
                =59 if age >=59 & age <= 60


2. For the earnings analysis related to Angrist & Acemoglu (2001), we use 40-49 year-old white men from 1960-80 US Censuses (IPUMS data from 1960 1% sample, 1970 Forms 1 and 2 State samples, and 1980 5 percent State sample).

--   Variables in "DataReadyForTest.dta":

year		Census year
birthyear		Year of birth
bplg		state of birth
statefip		state of residence
learn		log of annual earnings
ca9		Dummy: Compulsory attendance = 9
ca10		Dummy: Compulsory attendance = 10 
ca11		Dummy: Compulsory attendance >= 11


3. For the child health outcomes of Currie & Moretti (2003), we use their sample (first-time white mothers ages 24-35 from Vital Statistics Natality records from 1970-99) which include the following key variables in "LowBirthWeight.dta" and "PretermBirth.dta":

low1		low birth weight indicator
preterm1		pre-term birth indicator
educ		years of maternal education
college		total number of 4-year colleges in county and year / county population that year
collegeB		total number of 2-year colleges in county and year / county population that year
mdfinc		median county income	
urban		percent urban in county when mother was age 17
rcohort		ten year birth cohorts
agemom		mother's age
fips_yr		county * year of child's birth

